package com.xjscrm.console.mapper;

import com.xjscrm.common.entity.Material;
import com.xjscrm.console.param.materialLibrary.MaterialQuery;
import com.xjscrm.console.vo.MaterialVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MaterialMapper {
    int add(Material material);

    Material getById(@Param("id") Long id, @Param("merId") Long merId);

    int update(Material material);

    List<MaterialVo> getMaterialLibraryList(MaterialQuery materialQuery);

    int delById(@Param("id") Long id, @Param("merId") Long merId);

    Integer getEnterpriseCountByMerId(Long merId);

    Integer getPersonalCountByMerIdAndChildId(@Param("merId") Long merId, @Param("childId") Long childId);
}
